<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="../js/vuejs-2.5.16.js"></script>
</head>
<body>
<div id="app">
    <!--v-on;click vue中的单击事件,通过v-on:这个指令来完成-->
    <!--{{message}}<button v-on;click="demo01()>vue的单击事件</button>-->
    <!--
       v-on指令的简写方式
    -->
    {{message}}
    <button @click="demo02()">vue的单击事件</button>
</div>
<script>
    new Vue({
        el: "#app",
        data: {
            message: "hello vue"
        },
        methods: {
            //vue的method属性中可以用来定义各种方法,
            //vue中定义的方法
            //demo01;function
            demo01() {
                this.message = "itcast"
            },
            demo02() {
                this.message = "itheima"
            }
        }
    })
</script>
</body>
</html>